package allwe.pojo;

import allwe.service.MyInterface;
import lombok.AllArgsConstructor;

import java.io.Serializable;

@AllArgsConstructor
public class Student extends Person implements Serializable, MyInterface {

    private int studentNo;

    private double height;

    public Student() {
        System.out.println("********************");
        System.out.println("使用空参构造器");
        System.out.println("********************");
    }

    private Student(int studentNo) {
        this.studentNo = studentNo;
    }

    private void getStudentNo() throws Exception{
        System.out.println("student studentNo");
    }

    private void getStudentNo(int a){
        System.out.println("student studentNo     -----重载");
    }

    public void getHeight(){
        System.out.println("student height");
    }

    @Override
    public void myMethod() {
        System.out.println("实现了 MyMethod");
    }

    @Override
    public String toString() {
        return "Student{" +
                "studentNo=" + studentNo +
                ", height=" + height +
                ", name=" + name +
                '}';
    }
}
